home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / dev / misc / FlexCat.lha / Lib / SASasm_a.sd < prev    next >
Encoding:
Text File  |  1999-11-28  |  3.0 KB  |  115 lines

  1. ##rem $Id: SASasm_a.sd,v 1.2 1999/11/28 03:36:42 carlos Exp $
  2. ##stringtype assembler
  3. ##shortstrings
  4. *****************************************************************
  5. *   This file was created automatically by `%fv'
  6. *   from "%f0".
  7. *   Do NOT edit by hand!
  8. *****************************************************************
  9.  
  10. *   Includefiles
  11.         include "exec/types.i"
  12.         include "utility/tagitem.i"
  13.         include "libraries/locale.i"
  14.  
  15. *   Function declarations
  16.         xdef    Open%bCatalog
  17.         xdef    Close%bCatalog
  18.         xdef    Get%bString
  19.  
  20. *   Referenced data
  21.         xref    _LocaleBase
  22.  
  23. *   Referenced functions
  24.         xref    _LVOOpenCatalogA
  25.         xref    _LVOCloseCatalog
  26.         xref    _LVOGetCatalogStr
  27.  
  28. *   Data definitions
  29.         section data
  30. OpenCatalogTags:
  31.         cnop    0,4
  32.         dc.l    OC_Language,0
  33.         dc.l    OC_BuiltInLanguage,%b_BuiltInLanguage
  34.         dc.l    OC_Version,%v
  35.         dc.l    TAG_DONE,0
  36.  
  37. %b_BuiltInLanguage:
  38.         %l,0
  39.  
  40. CatalogName:
  41.         dc.b    '%b.catalog',0
  42.  
  43. \tcnop\t0,4\n\txdef\t%i\n%i:\tdc.l\t%d\n\t%s,0
  44.  
  45.         section bss
  46.         cnop    0,4
  47. %b_Catalog:
  48.         ds.l    1
  49.  
  50.  
  51. *   Code definitions
  52.         section code
  53.  
  54. Open%bCatalog:
  55. *   a0 = Locale
  56. *   a1 = Language
  57.         movem.l a2/a6,-(sp)             ;   Save Regs
  58.  
  59.         lea     OpenCatalogTags,a2      ;   Store Language
  60.         move.l  a1,4(a2)
  61.         bne     Open%bCatalog1
  62.         lea     8(a2),a2
  63. Open%bCatalog1:
  64.         move.l  _LocaleBase,a6          ;   Call locale.OpenCatalog
  65.         move.l  a6,d0                   ;   Locale opened?
  66.         beq     Open%bCatalogEnd        ;   No, skip
  67.         tst.l   %b_Catalog              ;   Catalog opened?
  68.         bne     Open%bCatalogEnd        ;   Yes, skip
  69.         lea     CatalogName,a1
  70.         jsr     _LVOOpenCatalogA(a6)
  71.         move.l  d0,%b_Catalog
  72. Open%bCatalogEnd:
  73.         movem.l (sp)+,a2/a6
  74.         rts
  75.  
  76.  
  77. Close%bCatalog:
  78.         move.l  a6,-(sp)
  79.         move.l  %b_Catalog,a0           ;   Close the Catalog, if needed
  80.         move.l  #0,%b_Catalog
  81.         move.l  _LocaleBase,a6
  82.         move.l  a6,d0                   ;   Locale.library opened?
  83.         beq     Close%bCatalogEnd       ;   No, skip
  84.         jsr     _LVOCloseCatalog(a6)
  85. Close%bCatalogEnd:
  86.         move.l  (sp)+,a6
  87.         rts
  88.  
  89.  
  90. Get%bString:
  91. *   a0 = pointer to structure (ID, string)
  92.         move.l  a6,-(sp)                ;   Save regs
  93.  
  94.         move.l  (a0)+,d0                ;   Get string number
  95.         move.l  a0,a1                   ;   Get default string
  96.  
  97. Get%bString3:
  98.         move.l  _LocaleBase,a6          ;   Locale.library present?
  99.         move.l  a6,d1
  100.         beq     Get%bStringNoLoc        ;   No, skip
  101.         move.l  %b_Catalog,a0           ;   Catalog opened?
  102.         move.l  a0,d1
  103.         beq     Get%bStringNoLoc        ;   No, skip
  104.  
  105.         jsr     _LVOGetCatalogStr(a6)   ;   Call locale.library
  106. Get%bStringEnd:
  107.         move.l  (sp)+,a6
  108.         rts
  109.  
  110. Get%bStringNoLoc:
  111.         move.l  a1,d0
  112.         bra     Get%bStringEnd
  113.  
  114.         end
  115.